package com.activity.controller;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

import com.activity.model.Goods;
import com.activity.service.GoodsService;

@Controller
public class GoodsController {
	@Resource
	private GoodsService goodsService;

	@RequestMapping(value="SaveGoods.do",method=RequestMethod.POST)
	@ResponseBody
	public boolean SaveGoods(Goods goods){
		return goodsService.SaveGoods(goods);
	}
	@RequestMapping(value="queryGoods.do")
	@ResponseBody
	public List<Goods> queryGoods() {
		return goodsService.queryGoods();
	}
}
